package br.com.bolsamovel;

import org.droidsql.DBHelpper;

import br.com.bolsamovel.db.DBInitializer;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;


public class InitActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.init_layout);
		
		Handler hnd = new Handler();
		
		hnd.postDelayed(new Runnable() {
			public void run() {
				Context ctx = InitActivity.this.getApplicationContext();
				
				DBHelpper.initSingleton(ctx, new DBInitializer());
				
				finish();
				
				Intent intent = new Intent();
                intent.setClass(ctx, MainActivity.class);
                startActivity(intent);
			}
		},1000);
	}

}